/*
 * @Description: 
 * @Author: BiChunkai 321521004@qq.com
 * @Date: 2025-05-27 10:09:35
 * @FilePath: /armEyeCalib_cpp/include/d435Camera.h
 * 
 * Copyright (c) 2025 by 无锡捷普迅科技有限公司, All Rights Reserved. 
 */
#pragma once

#include <librealsense2/rs.hpp>
#include <librealsense2/rsutil.h>
#include <iostream>
#include <opencv2/opencv.hpp>

class D435Camera
{
public:
    D435Camera();
    ~D435Camera();
    bool init();
    // bool getFrame(cv::Mat &color, cv::Mat &depth);
    bool getFrame(cv::Mat &color);
    void closeCamera();

private:
    rs2::pipeline pipe;       ///< 声明 RealSense 管道，封装实际设备和传感器
    rs2::config pipe_config;  ///< 声明 RealSense 管道配置，用于设置管道参数
    rs2::colorizer color_map; ///< 声明深度着色器以实现深度数据的漂亮可视化
    rs2::align align_to_depth; ///< 将深度图对齐到RGB图
    float depth_scale;        ///< 深度标尺，用于将深度值转换为实际距离
};
